//
//  HRPaysucceedViewController.m
//  haierapp
//
//  Created by Xia Zhiyong on 14-9-10.
//  Copyright (c) 2014年 haier. All rights reserved.
//

#import "HRPaysucceedViewController.h"

#import "HRUserGoodsListViewController.h"

@interface HRPaysucceedViewController ()

@end

@implementation HRPaysucceedViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    if (__CUR_IOS_VERSION >= __IPHONE_7_0)
    {
        self.edgesForExtendedLayout= UIRectEdgeNone;
    }
    self.navigationItem.title = @"支付宝支付";
    [self.navController showBackButtonWith:self andAction:@selector(back)];
}

-(void)back{
    switch (self.pushType) {
        case PUSH_FROM_LIST:
            [self.navigationController popViewControllerAnimated:YES];
            break;
        case PUSH_FROM_INFO:{
            for (UIViewController *temp in self.navigationController.viewControllers) {
                if ([temp isKindOfClass:[HRUserGoodsListViewController class]]) {
                    [self.navigationController popToViewController:temp animated:YES];
                }
            }
            break;
        }
        case PUSH_FROM_SUBMIT:{
            [self.navigationController popToRootViewControllerAnimated:YES];
            break;
        }
        default:
            break;
    }
    
}


- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
